package cn.wang.common.Exceptions.impl;

import cn.wang.common.Exceptions.LyBaseException;
import cn.wang.common.enums.ExceptionBaseEnum;
import com.sun.org.apache.bcel.internal.classfile.Code;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

@Getter
@AllArgsConstructor
@NoArgsConstructor
public class LyException extends LyBaseException {
    private Integer code;
    private String message;
    private ExceptionBaseEnum exceptionBaseEnum;

    public LyException(ExceptionBaseEnum em){
        this.code= em.getCode();
        this.message = em.getMessage();
        this.exceptionBaseEnum = em;
    }
}
